<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="main" v-cloak>
        <h1>{{msg}}</h1>
        <input type="button" value="点击" v-on:click="show">
        <input type="button" value="鼠标移动" v-on:mouseover="show">
        <input type="button" value="鼠标移动" @mouseover="show">
    </div>



    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#main',
            data: {
                msg: 'Hello Vue'
            },
            methods: {
                // show: function() {
                //     console.log('111')
                // }

                show() {
                    console.log('222')
                }

            }

        })
    </script>

</body>

</html>